Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Hook method to add custom data to JSON event #8

Merged
merged 1 commit into from
Dec 21, 2014

Conversation

marthursson
Copy link
Contributor

There are certain situations where you want to include custom data in the produced JSON event. This may include e.g. the argument array, unformatted message, etc.

Rather than including explicit support for all these situations, this pull request adds a hook method to JsonLayout, enabling you to simply subclass and override the new method and add the fields you need to include in the produced JSON.

An example where this would be useful is described here:
http://stackoverflow.com/questions/22615311/is-there-a-logback-layout-that-creates-json-objects-with-message-parameters-as-a

tony19 added a commit that referenced this pull request Dec 21, 2014
Hook method to add custom data to JSON event
@tony19 tony19 merged commit ef9f173 into qos-ch:master Dec 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants